<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::group(function () {
    //登录
    Route::post('forgetPwd', 'Login/forgotPassword');
    Route::post('loginForgetPwd', 'Login/loginForgotPassword');
    Route::post('pwdLogin', 'Login/pwdLogin');
    Route::get('checkLogin', 'Login/checkLogin');
    Route::post('login', 'Login/wechatLogin');
    Route::post('smsLogin', 'Login/smsLogin');
    Route::get('getPhoneExist', 'Login/phoneExist');
    Route::post('logout', 'Login/logout');
    Route::post('reUpdatePwd', 'Login/reUpdatePwd');

    Route::get('getUserInfo', 'User/userInfo');
    Route::post('updateInfo', 'User/updateInfo');

    Route::post('student/grade/listSelectPage', 'student.grade/listSelectPage');

    //注册
    Route::post('register', 'Register/register');
});

//全科学习
Route::group('subject', function () {
    Route::get('grade', 'subject/Subject/grade');//全科年级
    Route::get('subject', 'subject/Subject/subject');//全科科目
    Route::post('courseList', 'subject/Subject/courseList');//课程列表
    Route::get('knowledge', 'subject/Subject/knowledge');//知识点
    Route::get('getCourseDetail', 'subject/Subject/getCourseDetail');//课程详情
    Route::get('courseChapter', 'subject/Subject/courseChapter');//课程章节
    Route::get('chapterQuestion', 'subject/Subject/chapterQuestion');//章节题目
    Route::get('chapterKnowledge', 'subject/Subject/chapterKnowledge');//章节知识点

    Route::post('startLearn', 'subject/Subject/startLearn');//开始学习
    Route::post('updateDuration', 'subject/Subject/updateDuration');//更新学习时长和进度
    Route::post('listLearnRecordPage', 'subject/Subject/listLearnRecordPage');//分页-学习记录列表

    Route::post('feedback', 'subject/Subject/feedback');//提交反馈

    Route::post('listHomeworkPage', 'subject/Subject/listHomeworkPage');//分页-课后作业
    Route::get('homeworkQuestion', 'subject/Subject/homeworkQuestion');//课后作业习题
});

//全科题库
Route::group('subject/question', function () {

    Route::post('startQuestion', 'subject/Question/startQuestion');//开始答题
    Route::post('answerQuestion', 'subject/Question/answerQuestion');//答案提交
    Route::get('getAnswerDetail', 'subject/Question/getAnswerDetail');//获取答题详情
});

Route::group('trainer', function () {
    Route::post('listSelectPage', 'trainer/Trainer/listSelectPage');//老师分页Select查询
});

//排课预约
Route::group('course', function () {
    Route::get('appointmentListByMonth', 'course/CourseAppointment/appointmentListByMonth');//排课记录-按月
    Route::get('appointmentListByDay', 'course/CourseAppointment/appointmentListByDay');//排课记录-按日
    Route::get('appointmentListByStatus', 'course/CourseAppointment/appointmentListByStatus');//排课记录-按日
    Route::get('appointmentListByBefore', 'course/CourseAppointment/appointmentListByBefore');//排课记录-按日

    Route::post('submitAppointment', 'course/CourseAppointment/submitAppointment');//提交预约
    Route::post('submitExperienceAppointment', 'course/CourseAppointment/submitExperienceAppointment');//提交体验预约
    Route::get('experienceAppointmentConfig', 'course/CourseAppointment/experienceAppointmentConfig');//体验预约配置
});

Route::group('learn/learnSkRecord', function () {
    Route::get('listXkPage', 'learn/LearnSkRecord/listXkPage');//上课记录
    Route::get('getSkRecordReport', 'learn/LearnSkRecord/getSkRecordReport');//上课记录
    Route::get('wordMemorization', 'learn/LearnSkRecord/wordMemorization');//单词识记
    Route::get('skRecordWordMemorization', 'learn/LearnSkRecord/skRecordWordMemorization');//按上课记录查单词识记
});

//收藏
Route::group('collet', function () {
    Route::post('courseCollect/addCollect', 'collect/CourseCollect/addCollect');//添加课程收藏
    Route::post('courseCollect/delCollect', 'collect/CourseCollect/delCollect');//删除课程收藏
    Route::post('courseCollect/listCollectPage', 'collect/CourseCollect/listCollectPage');//分页-课程收藏列表
});

//通知公告
Route::group('system', function () {
    Route::get('sysNotification/listMyNotification', 'system/SysNotification/listMyNotification');//公告列表
    Route::get('sysNotification/getNotificationInfo', 'system/SysNotification/getNotificationInfo');//公告详情
    Route::get('sysNotification/getMyUnreadCount', 'system/SysNotification/getMyUnreadCount');//查询-未读数量
});

//说吧ai课程阶段
Route::group('say/category', function () {
    Route::post('listCategory', 'say/SayCategory/listCategory');
});

//说吧年级
Route::group('say/grade', function () {
    Route::post('listGradePage', 'say/Grade/listGradePage');
    Route::post('listGrade', 'say/Grade/listGrade');
});


//说吧ai课程句型
Route::group('say/sayTeachSentence', function () {
    //课程阶段
    Route::post('listTeachSentence', 'say/SayTeachSentence/listTeachSentence');
    Route::post('getTeachSentenceInfo', 'say/SayTeachSentence/getTeachSentenceInfo');
});

//说吧ai课程学习
Route::group('say/question', function () {
    Route::post('listQuestionData', 'say/Question/listQuestionData');//学习记录
    Route::post('startQuestion', 'say/Question/startQuestion');//开始学习
    Route::post('answerQuestion', 'say/Question/answerQuestion');//提交答案
    Route::get('getSayQuestionReport', 'say/Question/getSayQuestionReport');//获取报告
    Route::post('readEval', 'say/Question/readEval');//口语测评
    Route::get('listListenSound', 'say.Question/listListenSound');//口语测评
});

//说吧ai抗遗忘
Route::group('learn/learnSayAntiForgetting', function () {
    Route::get('listMyListToday', 'learn/LearnSayAntiForgetting/listMyListToday');//今日抗遗忘
    Route::get('listMyListBefore', 'learn/LearnSayAntiForgetting/listMyListBefore');//往期抗遗忘
    Route::post('startAntiForgetting', 'learn/LearnSayAntiForgetting/startAntiForgetting');//开始抗遗忘
    Route::get('listForgettingData', 'learn/LearnSayAntiForgetting/listForgettingData');//抗遗忘数据
    Route::post('endAntiForgetting', 'learn/LearnSayAntiForgetting/endAntiForgetting');//结束抗遗忘
    Route::get('getForgettingReport', 'learn/LearnSayAntiForgetting/getForgettingReport');//抗遗忘报告
});

//说吧ai真英语测试
Route::group('learn/learnSayVocabularyRecord', function () {
    Route::post('listVocabularyData', 'learn/LearnSayVocabularyRecord/listVocabularyData');//测试列表
    Route::get('getVocabularyRecord', 'learn/LearnSayVocabularyRecord/getVocabularyRecord');//测试报告
});

//生词本
Route::group('student/studentSaySentence', function () {
    Route::post('listPage', 'student/studentSaySentence/listPage');//生词本列表
    Route::post('del', 'student/studentSaySentence/del');//生词本删除
});

//复习
Route::group('say/review', function () {
    Route::post('listReviewData', 'say.Review/listReviewData');//复习列表
    Route::get('getSayReviewReport', 'say.Review/getSayReviewReport');//学习结果报告
});

//体验课
Route::group('core/coreTrialClassOrder', function () {
    Route::post('placeTrialClassOrder', 'core.CoreTrialClassOrder/placeTrialClassOrder');//创建订单
    Route::post('pay', 'core.CoreTrialClassOrder/pay');//支付订单
});

//订阅
Route::group('subscribeMsg', function () {
    Route::get('getSubscribeNum', 'SubscribeMsg/getSubscribeNum');//查询-我的订阅次数
    Route::post('subscribe', 'SubscribeMsg/subscribe');//订阅
});


